package com.woniu.controller;

import com.woniu.entity.RegUser;
import com.woniu.service.RegUserService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @Classname UserController
 * @Description TODO
 * @Date 2025/10/24 15:09
 * @Created by pc
 */
@RestController
public class UserController {

    @Resource
    private RegUserService regUserService;

    // 注册接口
    @PostMapping("/reg")
    public Map<String,Object> reg(@RequestBody RegUser regUser){
        return regUserService.reg(regUser);
    }
    // 激活
    @PostMapping("/user")
    public Map<String,Object> active(@RequestBody RegUser regUser){
        return regUserService.active(regUser);
    }
    // 登录
    @PostMapping("/login")
    public Map<String,Object> login(@RequestBody RegUser regUser){
        return regUserService.login(regUser);
    }
}
